package io.github.siltal.examsystembackend.dto;

import io.github.siltal.examsystembackend.entity.ExamHistory;

import java.util.List;

//export interface ExamHistoryItem {
//    id: number
//    date: string
//    score: number
//    questions: ExamHistoryQO[]
//}

// 可以用 record (Java 16+) 来简化，或者普通的 class
public record ExamHistoryFetchResponse(
        Boolean ok,
        List<ExamHistoryItem> examHistoryItems
) {
 public static ExamHistoryFetchResponse from(List<ExamHistoryItem> examHistories) {
     return new ExamHistoryFetchResponse(true,examHistories);
 }
}

